Optimal. Leaf size=35 \[ -\frac {a+b \tanh ^{-1}\left (\frac {c}{x}\right )}{x}-\frac {b \log \left (1-\frac {c^2}{x^2}\right )}{2 c} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {6037, 266}
\begin {gather*} -\frac {a+b \tanh ^{-1}\left (\frac {c}{x}\right )}{x}-\frac {b \log \left (1-\frac {c^2}{x^2}\right )}{2 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 266
Rule 6037
Rubi steps
\begin {align*} \int \frac {a+b \tanh ^{-1}\left (\frac {c}{x}\right )}{x^2} \, dx &=-\frac {a+b \tanh ^{-1}\left (\frac {c}{x}\right )}{x}-(b c) \int \frac {1}{\left (1-\frac {c^2}{x^2}\right ) x^3} \, dx\\ &=-\frac {a+b \tanh ^{-1}\left (\frac {c}{x}\right )}{x}-\frac {b \log \left (1-\frac {c^2}{x^2}\right )}{2 c}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 38, normalized size = 1.09 \begin {gather*} -\frac {a}{x}-\frac {b \tanh ^{-1}\left (\frac {c}{x}\right )}{x}-\frac {b \log \left (1-\frac {c^2}{x^2}\right )}{2 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 39, normalized size = 1.11
method | result | size |
derivativedivides | \(-\frac {\frac {c a}{x}+\frac {b c \arctanh \left (\frac {c}{x}\right )}{x}+\frac {b \ln \left (1-\frac {c^{2}}{x^{2}}\right )}{2}}{c}\) | \(39\) |
default | \(-\frac {\frac {c a}{x}+\frac {b c \arctanh \left (\frac {c}{x}\right )}{x}+\frac {b \ln \left (1-\frac {c^{2}}{x^{2}}\right )}{2}}{c}\) | \(39\) |
risch | \(-\frac {b \ln \left (x +c \right )}{2 x}+\frac {i \pi b c \,\mathrm {csgn}\left (i \left (c -x \right )\right ) \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{2}-i \pi b c \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )^{2}+i \pi b c \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (x +c \right )\right ) \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )+i \pi b c \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{3}+i \pi b c \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{2}+2 i \pi b c -i \pi b c \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (c -x \right )\right ) \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )-i \pi b c \,\mathrm {csgn}\left (i \left (x +c \right )\right ) \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )^{2}+i \pi b c \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )^{3}-2 i \pi b c \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{2}+4 b \ln \left (x \right ) x -2 b \ln \left (-c^{2}+x^{2}\right ) x +2 \ln \left (c -x \right ) b c -4 a c}{4 c x}\) | \(289\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 37, normalized size = 1.06 \begin {gather*} -\frac {b {\left (\frac {2 \, c \operatorname {artanh}\left (\frac {c}{x}\right )}{x} + \log \left (-\frac {c^{2}}{x^{2}} + 1\right )\right )}}{2 \, c} - \frac {a}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 48, normalized size = 1.37 \begin {gather*} -\frac {b x \log \left (-c^{2} + x^{2}\right ) - 2 \, b x \log \left (x\right ) + b c \log \left (-\frac {c + x}{c - x}\right ) + 2 \, a c}{2 \, c x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.30, size = 39, normalized size = 1.11 \begin {gather*} \begin {cases} - \frac {a}{x} - \frac {b \operatorname {atanh}{\left (\frac {c}{x} \right )}}{x} + \frac {b \log {\left (x \right )}}{c} - \frac {b \log {\left (- c + x \right )}}{c} - \frac {b \operatorname {atanh}{\left (\frac {c}{x} \right )}}{c} & \text {for}\: c \neq 0 \\- \frac {a}{x} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 87 vs.
\(2 (33) = 66\).
time = 0.42, size = 87, normalized size = 2.49 \begin {gather*} \frac {b \log \left (-\frac {c + x}{c - x} + 1\right ) - b \log \left (-\frac {c + x}{c - x}\right ) - \frac {b \log \left (-\frac {c + x}{c - x}\right )}{\frac {c + x}{c - x} - 1} - \frac {2 \, a}{\frac {c + x}{c - x} - 1}}{c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.74, size = 43, normalized size = 1.23 \begin {gather*} \frac {b\,x\,\ln \left (x\right )-\frac {b\,x\,\ln \left (x^2-c^2\right )}{2}}{c\,x}-\frac {a+b\,\mathrm {atanh}\left (\frac {c}{x}\right )}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________